import request from '@/utils/request'
import { useStore } from 'vuex'

export default{
    addBot(title, description, content) {
        const store = useStore();
        return request({
            url: `/user/bot/add/`,
            method: 'post',
            data: {
                title: title,
                description: description,
                content: content,
            },
            headers: {
                Authorization: "Bearer " + store.state.user.token,
            },
          })
    },

    test() {
        // const store = useStore();
        return request({
            url: `/user/bot/test`,
            method: 'get',
        })
    },
}